/*
 * Copyright 2008 Max Kugland
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.splink.library.logging {
	import org.splink.library.logging.logoutput.ILogOutput;

	/**
	 * <code>NullLogger</code> is a dummy class to prevent errors if <code>LoggerProvider</code> is
	 * unable to provide any <code>ILogger</code> instances, which most likely is the case if no
	 * <code>LoggerFactory</code> has been configured to be used by <code>LoggerProvider</code>.
	 * 
	 * @author Max Kugland
	 */
	public class NullLogger implements ILogger {

		/**
		 * @inheritDoc
		 */
		public function set range(range : LogRange) : void {
		}

		/**
		 * @inheritDoc
		 */
		public function set basePackage(pack : String) : void {
		}

		/**
		 * @inheritDoc
		 */
		public function log(level : uint, message : *, ignoreRange : Boolean = false) : void {
		}

		/**
		 * @inheritDoc
		 */
		public function stackTrace(maxlines : uint = 5) : void {
		}

		/**
		 * @inheritDoc
		 */
		public function logGarbageCollection(obj : *, id : String = null) : void {
		}

		/**
		 * @inheritDoc
		 */
		public function finalize() : void {
		}

		/**
		 * @inheritDoc
		 */
		public function getLogOutput(clazz : Class) : ILogOutput {
			return null;
		}
		
		/**
		 * @inheritDoc
		 */
		public function trace(...args) : void {
		}
		
		/**
		 * @inheritDoc
		 */
		public function info(...args) : void {
		}
		
		/**
		 * @inheritDoc
		 */
		public function debug(...args) : void {
		}
		
		/**
		 * @inheritDoc
		 */
		public function warn(...args) : void {
		}
		
		/**
		 * @inheritDoc
		 */
		public function error(...args) : void {
		}
		
		/**
		 * @inheritDoc
		 */
		public function fatal(...args) : void {
		}
	}
}
